<!--#include file="conn.asp"-->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户中心</title>
</head>
<%
nickname = request("nickname")
%>
<body bgcolor="#E3E3E3">
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">  
  <tr>
    <td height="60" colspan="3" align="center" bgcolor="#CCCCCC">用户中心</td>
  </tr>
  <tr>
    <td width="130" height="100" rowspan="7" align="center" valign="middle">
    	<%if session("headimg")<>""then%><img src="<%=session("headimg")%>" width="80" height="80">
    	<%else%>
    	<img src="head.jpg" width="80" height="80">
      <%end if%>
    </td> 
     
  </tr>
  
  <tr>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>微信名：<%=nickname%></td>
  </tr>
  <tr>
    <td rowspan="3">&nbsp;</td>
    <td>openid：<%=session("openid")%></td>
  </tr>
   
  <tr>
    <td align="right">&nbsp;</td>
    <td>&nbsp;</td>
    <td>    	 
    	<a href="?action=loginOUT"> 退出登陆</a>
    </td>
  </tr>
</table>
<%
'退出登陆
if request("action")="loginOUT" then
session("nickname")=""
session("openid")=""
session("headimg")=""
ip=session("ip")

'更新登录标志，或者直接删除也可
set rs=server.CreateObject("adodb.recordset")
sql="update userinfo set login_state='0' where ip='"& ip &"'"
on error resume next
rs.open sql,conn
set rs=nothing

Response.Write("<script language=""JavaScript"">alert(""您已安全退出会员中心！"");</script>")
response.write "<Meta http-equiv='refresh' content='0;URL=index.asp'>"
	
end if
%> 
</body>
</html>